package org.tio.sitexxx.web.server.controller.minip;

import org.tio.http.server.annotation.RequestPath;
import org.tio.sitexxx.service.model.main.Knowledge;

import org.tio.sitexxx.service.service.qj.KnowledgeService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RequestPath(value = "/article")
public class ArticleController {
    /**
     * 返回knowledge文章列表
     * @param pageNum
     * @return
     */
    @RequestPath("/list")
    public List<Knowledge> list(Integer pageNum) {
        if(pageNum==null)return null;
        Map<String,Object> map = new HashMap<>();
        map.put("pageNum", pageNum*10);
        return KnowledgeService.me.getArticle(map);
    }
}
